﻿using System;
using System.Collections.Generic;


namespace DailyFx.AI
{
	public interface IPloyment
	{
		/// <summary>
		///		Gets the blackboard of knowledges taken advatage by this ployment .
		/// </summary>
		IBlackboard Blackboard { get; }

		/// <summary>
		///		the zone domain .
		/// </summary>
		Guid Zone { get; }

		/// <summary>
		///		Gets the detailed plan to execute .
		/// </summary>
		IPlan Plan { get; }

		/// <summary>
		///		Gets the mediator to nominate experts .
		/// </summary>
		IMediator Mediator { get; }

		/// <summary>
		///		Gets the experts' list on the ployment .
		/// </summary>
		 IReadOnlyList<IExpert> Experts { get; }


		/// <summary>
		///		Gets the driver to run this ployment.
		/// </summary>
		 IDriver Driver { get; }



		/// <summary>
		///		Executes thie ployment . 
		/// </summary>
		bool Run();

		/// <summary>
		///		Terminates the ployment .
		/// </summary>
		void Stop ();


		/// <summary>
		/// 
		/// </summary>
		 void registerListener ( IPloymentListener listener );
		/// <summary>
		/// 
		/// </summary>
		 void removeListener ( IPloymentListener listener) ;

	}




	/// <summary>
	///		Monitor of <see cref="Ployment"/>'s states .
	/// </summary>
	public interface IPloymentListener
	{
		/// <summary>
		/// 
		/// </summary>
		 void OnTasksDecided ( IPloyment ployment, IReadOnlyList<DailyFx.AI.ITask> tasks );

		/// <summary>
		/// 
		/// </summary>
		 void OnExpertNominated ( IPloyment ployment, IExpert export );
	}

}
